#include <stdio.h>
#include <string.h>

int main(int argc, char *argv[])
{
	char buf[256], *ps, tmp[256];
	int i, j, t;
	long max = 0, ft;

	gets(buf);
	for (i=0; i<strlen(buf); i++) {
		if (isdigit(buf[i])) {
			for (j=i; j<strlen(buf); j++) {
				if (!isdigit(buf[j])) {
					break;
				}
			}
			memset(tmp, '\0', sizeof(tmp));
			strncpy(tmp, buf+i, j-i);
			ft = atol(tmp);
			if (ft > max) {
				max = ft;
				t = i;
			}
			i = j;
		}
	}

	printf("%d\n", t+1);

	return 0;
}
